@echo off

REM ********
REM Requires Micorosoft.Net Framework
REM ********
set dotnetpath=C:\Windows\Microsoft.NET\Framework\v4.0.30319

REM ********
REM Deletes the old DLL
REM ********
del .\Debug\axtrackir.dll
del .\Debug\axtrackir.tlb

REM ********
REM Creates the new DLL and registers it
REM ********
%dotnetpath%\csc.exe /t:library /out:.\Debug\axtrackir.dll ActiveX.cs
%dotnetpath%\RegAsm.exe .\Debug\axtrackir.dll /register /codebase /tlb
regedit.exe /s register_dll.reg